package com.supermap.desktop.ui.controls;

import javax.swing.JPanel;
import javax.swing.GroupLayout.Alignment;
import javax.swing.LayoutStyle.ComponentPlacement;
import javax.swing.GroupLayout;

/**
 *
 * @author huchenpu
 */
public class WorkspaceInfoSQL extends javax.swing.JPanel {

    /**
     * Creates new form WorkspaceInfoSQL
     */
    public WorkspaceInfoSQL() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
    private void initComponents() {

        jLabelServer = new javax.swing.JLabel();
        jLabelDatabase = new javax.swing.JLabel();
        jLabelUser = new javax.swing.JLabel();
        jLabelPassword = new javax.swing.JLabel();
        jLabelName = new javax.swing.JLabel();
        jComboBoxWorkspaceName = new javax.swing.JComboBox();
        jTextFieldPassword = new javax.swing.JTextField();
        jTextFieldUser = new javax.swing.JTextField();
        jTextFieldDatabase = new javax.swing.JTextField();
        jComboBoxServer = new javax.swing.JComboBox();

        jLabelServer.setText("Server:");

        jLabelDatabase.setText("Database:");

        jLabelUser.setText("User:");

        jLabelPassword.setText("Password:");

        jLabelName.setText("Name:");

        jComboBoxWorkspaceName.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));

        jTextFieldPassword.setText("jTextField2");

        jTextFieldUser.setText("jTextField2");

        jTextFieldDatabase.setText("jTextField1");

        jComboBoxServer.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        jComboBoxServer.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jComboBoxServerActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
        layout.setHorizontalGroup(
        	layout.createParallelGroup(Alignment.LEADING)
        		.addGroup(layout.createSequentialGroup()
        			.addContainerGap()
        			.addGroup(layout.createParallelGroup(Alignment.LEADING)
        				.addComponent(jLabelServer)
        				.addComponent(jLabelDatabase)
        				.addComponent(jLabelUser)
        				.addComponent(jLabelPassword)
        				.addComponent(jLabelName))
        			.addPreferredGap(ComponentPlacement.RELATED, 44, Short.MAX_VALUE)
        			.addGroup(layout.createParallelGroup(Alignment.LEADING, false)
        				.addComponent(jTextFieldDatabase, GroupLayout.DEFAULT_SIZE, 291, Short.MAX_VALUE)
        				.addComponent(jTextFieldUser, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        				.addComponent(jTextFieldPassword, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        				.addComponent(jComboBoxWorkspaceName, 0, GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        				.addComponent(jComboBoxServer, Alignment.TRAILING, GroupLayout.PREFERRED_SIZE, 320, GroupLayout.PREFERRED_SIZE))
        			.addContainerGap())
        );
        layout.setVerticalGroup(
        	layout.createParallelGroup(Alignment.LEADING)
        		.addGroup(layout.createSequentialGroup()
        			.addContainerGap()
        			.addGroup(layout.createParallelGroup(Alignment.BASELINE)
        				.addComponent(jComboBoxServer, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
        				.addComponent(jLabelServer))
        			.addPreferredGap(ComponentPlacement.RELATED)
        			.addGroup(layout.createParallelGroup(Alignment.BASELINE)
        				.addComponent(jTextFieldDatabase, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
        				.addComponent(jLabelDatabase))
        			.addPreferredGap(ComponentPlacement.RELATED)
        			.addGroup(layout.createParallelGroup(Alignment.BASELINE)
        				.addComponent(jTextFieldUser, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
        				.addComponent(jLabelUser))
        			.addPreferredGap(ComponentPlacement.RELATED)
        			.addGroup(layout.createParallelGroup(Alignment.BASELINE)
        				.addComponent(jTextFieldPassword, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
        				.addComponent(jLabelPassword))
        			.addPreferredGap(ComponentPlacement.RELATED)
        			.addGroup(layout.createParallelGroup(Alignment.BASELINE)
        				.addComponent(jComboBoxWorkspaceName, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
        				.addComponent(jLabelName))
        			.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        this.setLayout(layout);

        jLabelServer.getAccessibleContext().setAccessibleName("jLabelServer");
        jLabelDatabase.getAccessibleContext().setAccessibleName("jLabelDatabase");
        jLabelUser.getAccessibleContext().setAccessibleName("jLabelUser");
        jLabelPassword.getAccessibleContext().setAccessibleName("jLabelPassword");
        jLabelName.getAccessibleContext().setAccessibleName("jLabelName");
        jComboBoxWorkspaceName.getAccessibleContext().setAccessibleName("jComboBoxWorkspaceName");
        jTextFieldPassword.getAccessibleContext().setAccessibleName("jTextFieldPassword");
        jTextFieldUser.getAccessibleContext().setAccessibleName("jTextFieldUser");
        jTextFieldDatabase.getAccessibleContext().setAccessibleName("jTextFieldDatabase");
        jComboBoxServer.getAccessibleContext().setAccessibleName("jComboBoxServer");
    }// </editor-fold>                        

    private void jComboBoxServerActionPerformed(java.awt.event.ActionEvent evt) {                                                
        // TODO add your handling code here:
    }                                               


    // Variables declaration - do not modify                     
    private javax.swing.JComboBox jComboBoxServer;
    private javax.swing.JComboBox jComboBoxWorkspaceName;
    private javax.swing.JLabel jLabelDatabase;
    private javax.swing.JLabel jLabelName;
    private javax.swing.JLabel jLabelPassword;
    protected javax.swing.JLabel jLabelServer;
    private javax.swing.JLabel jLabelUser;
    private javax.swing.JTextField jTextFieldDatabase;
    private javax.swing.JTextField jTextFieldPassword;
    private javax.swing.JTextField jTextFieldUser;
    // End of variables declaration                   
}
